﻿using Microsoft.Practices.Prism.Commands;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;

namespace Demo01.Designtime
{
    public class MainPageViewModel : ViewModels.IMainPageViewModel
    {
        public MainPageViewModel()
        {
            var repository = new Repositories.ItemRepository();
            this.Items = new ObservableCollection<Models.Item>();
            foreach (var item in repository.AllItems())
                this.Items.Add(item);
        }

        public ObservableCollection<Models.Item> Items { get; set; }
        public Models.Item Selected { get; set; }
        public int Value { get; set; }
        public DelegateCommand AboutCommand { get; set; }
        public DelegateCommand OpenCommand { get; set; }
    }
}
